
//Table A10 final run
log using "$rootpath/log/Table_A10_Results.log", replace
///This is the different quartiles and quintiles comp. 
eststo clear
use "$rootpath/processed_data/Estimation_Data.dta", clear
drop if key_estimation_sample==0
sort facility_id year
egen num_obs=nvals(year), by(facility_id)

reghdfe  log_tot_damage_WONOXSOX treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
estimates store robust_wo_damage

reghdfe  log_emis_WONOXSOX treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
estimates store robust_wo_emission

reghdfe  log_tot_damage_WINOXSOX treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
estimates store robust_wi_damage

reghdfe  log_emis_WINOXSOX treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
estimates store robust_wi_emission

esttab robust_wo_damage robust_wi_damage robust_wo_emission robust_wi_emission using "$rootpath/table_graph/TBL_A10.tex",  star( * 0.1 ** 0.05 *** 0.01) cells(b(star fmt(3)) se(par fmt(3))) keep(treatXpost _cons) scalars(N F) ar2 replace 
log close
